<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
        <meta name="format-detection" content="telephone=no"/>
        <title>站址筛选框</title>
        <link rel="stylesheet" type="text/css" href="../../css/api.css"/>
        <link rel="stylesheet" type="text/css" href="../../css/query-list.css"/>
        <style>
									html, body {
										background-color:transparent !important;
										color:rgba(0,0,0,0.0)
									}
        </style>
    </head>
    <body>
        <!--设置遮罩层-->
        <div id="popupWrapper" style="display: none">
            <div id="shadeWrapper" class="popup-mask active"></div>
            <div id="queryListBox" class="view agile-popup bottom">
                <div id="options" class="hotel-p-s-filter js_price_star_filter">
                    <dl>
                        <div id="stationNameOpt" data-type="text" style="display: none">
                            <dt>
                                站址名称
                            </dt>
                            <dd class="js_price_h js_price_all" onclick="openQueryStationWin()">
                                <input id="stationname" type="text" value=""/>
                                <input id="stationcode" type="hidden" value=""/>
                                <img class="close" src="../../image/icons/png/close.png"/>
                            </dd>
                        </div>
                        <!-- <div id="stationCodeOpt" data-type="text" style="display: none">
                        <dt>
                        站址编码
                        </dt>
                        <dd class="js_price_h">
                        <input id="stationCode" type="text"/>
                        <img class="close" src="../../image/icons/png/close.png"/>
                        </dd>
                        </div>-->
                        <!--<div id="begintimetype" data-type="radio" style="display: none">
                        <dt>
                        时间范围（单选）
                        </dt>
                        <dd  class="js_star_h js_star_all current" data-value="">
                        全部
                        </dd>
                        <dd id="time0" class="js_star_h" data-value="0">
                        今天
                        </dd>
                        <dd id="time1" class="js_star_h" data-value="1">
                        昨天
                        </dd>
                        <dd id="time2" class="js_star_h" data-value="2">
                        三天前
                        </dd>
                        <dd id="time3" class="js_star_h" data-value="3">
                        一个星期前
                        </dd>
                        <dd id="time4" class="js_star_h" data-value="4">
                        一个月前
                        </dd>
                        </div>-->
                        <div id="status" data-type="radio" style="display: none">
                            <dt>
                                站址状态（单选）
                            </dt>
                            <dd class="js_star_h js_star_all current" data-value="">
                                不限
                            </dd>
                             <dd  class="js_star_h" data-value="1">
                                工程
                            </dd>
                            <dd  class="js_star_h" data-value="2">
                                交维
                            </dd>
                             <dd  class="js_star_h" data-value="3">
                                退网下线
                            </dd>
                            <dd class="js_star_h" data-value="6">
                                测试
                            </dd>

                            <dd  class="js_star_h" data-value="7">
                                存量监控
                            </dd>
                            <dd  class="js_star_h" data-value="8">
                          检修
                            </dd>
                        </div>

                        <div id="billType" data-type="radio" style="display: none">
                            <dt>
                                工单类型（单选）
                            </dt>
                            <dd class="js_star_h js_star_all current" data-value="">
                                不限
                            </dd>
                             <dd  class="js_star_h" data-value="1">
                                上站单
                            </dd>
                            <dd  class="js_star_h" data-value="2">
                                日常维修
                            </dd>
                             <dd  class="js_star_h" data-value="3">
                                巡检
                            </dd>
                            <dd class="js_star_h" data-value="4">
                                故障单
                            </dd>

                            <dd  class="js_star_h" data-value="5">
                                停发电工单
                            </dd>
                        </div>

                        <div id="type" data-type="radio" style="display: none">
                            <dt>
                                站址类型（单选）
                            </dt>
                            <dd class="js_star_h current" data-value="">
                                不限
                            </dd>
                            <dd class="js_star_h" data-value="1">
                                室内宏站
                            </dd>
                            <dd class="js_star_h" data-value="2">
                                室外站
                            </dd>
                            <dd class="js_star_h" data-value="3">
                                室分
                            </dd>
                            <dd class="js_star_h" data-value="4">
                                BBU
                            </dd>
                            <dd class="js_star_h" data-value="5">
                                RRU
                            </dd>
                        </div>
                        <div id="registstatus" data-type="radio" style="display: none">
                            <dt>
                                FSU状态（单选）
                            </dt>
                            <dd class="js_star_h current" data-value="">
                                不限
                            </dd>
                            <dd class="js_star_h" data-value="1">
                                在线
                            </dd>
                            <dd class="js_star_h" data-value="0">
                                离线
                            </dd>

                        </div>
                        <div id="unitOpt" data-type="text" style="display: none">
                            <dt>
                                省份/城市/区域
                            </dt>
                            <dd class="js_price_h" style="width:100%;height:40px;padding:0;" onclick="toggleQueryUnit()">
                                <input id="unit" type="text" readonly/>
                                <input id="provinceid" type="hidden"  />
                                <input id="cityid" type="hidden"  />
                                <input id="areaid" type="hidden" />
                                <img class="close" src="../../image/icons/png/close.png"/>
                            </dd>
                        </div>
                        <div class="mt10">
                            <!--  <button class="g_btn_s js_price_star_filter_ok" onclick="clear()">
                            重置
                            </button>-->
                            <button class="g_btn_s js_price_star_filter_ok" onclick="query()">
                                查询
                            </button>
                        </div>
                    </dl>
                </div>
            </div>
        </div>
    </body>
    <script type="text/javascript" src="../../script/jquery-1.11.3.min.js"></script>
    <script type="text/javascript" src="../../script/api.js"></script>
    <script type="text/javascript" src="../../script/debug.js"></script>
    <script type="text/javascript" src="../../script/common.js"></script>
    <script type="text/javascript" src="../../script/component.js"></script>
    <script type="text/javascript">
        var winName = null;
        var frameName = null;
        var callback = null;
        apiready = function() {
            winName = api.pageParam.winName;
            frameName = api.pageParam.frameName;
            callback = api.pageParam.callback;
            initQueryBox();
            popup_query.init();
            popup_query.showPopup();
            api.parseTapmode();
            //          $('#popupWrapper').show();
        }
        function initQueryBox() {
            $('dl>div').each(function() {
                var id = $(this).attr('id');
                if (api.pageParam[id]) {
                    $(this).show();
                }
            });
        }

        /**
         *打开站址查询接口
         */
        function openQueryStationWin() {
            api.openWin({
                name : 'stationSearch_win',
                url : 'stationSearch_win.html',
                pageParam : {
                    winName : api.winName,
                    frameName : 'popup_query_frm'
                }
            });
        }

        function query() {
            var callback = api.pageParam.callback;
            var formData = popup_query.serializeAll();
            var frameName=$api.getStorage('stateselcetframeName222');
            console.log("11");
            transferObj(formData, {
                winName : winName,
                frameName : frameName
            }, callback);
            console.log("12");
            popup_query.hidePopup();
        }

        /**
         *设置站址名称和站址编码
         */
        function onStationSelect(stationname, stationcode) {
            $("#stationname").val(stationname).parent().addClass('active');
            $("#stationcode").val(stationcode);
        }

        /**
         * 打开部门查询组件
         */
        function toggleQueryUnit() {
            var query_setting = {
                name : api.winName,
                frameName : 'popup_query_frm'
            }
            api.openWin({
                name : 'unitSelect',
                url : '../common/unitSelect_win.html',
                opaque : true,
                bounces : false,
                reload : false,
                vScrollBarEnabled : false,
                pageParam : query_setting,
                animation : {
                    type : "push",
                    subType : "from_right",
                    duration : 300
                }
            });
        }

        /**
         * 设置省市区的值
         */
        function fillUnitData(provId, provStr, cityId, cityStr, objId, objText, unitId, unitStr) {
            console.log("hzh1");
            $('#unit').val(unitStr).attr('data-unitId', unitId).parent().addClass('active');
            console.log("hzh2");
            $('#provinceid').val(provId);
            console.log("省:"+provId);
            console.log("市:"+cityId);
            console.log("区:"+objId);
            $('#cityid').val(cityId);
            $('#areaid').val(objId);
            console.log("hzh3");
//              showAlert("提示","省:"+$("provinceid").val()+",市:"+$("cityid").val()+",区:"+$("areaid").val()+",别名:"+unitStr);
        }
    </script>
</html>
